class ButtonElement extends Element {
  constructor(layoutNode, context) {
    super(layoutNode, context)
    this.backgroundColor = '#0f0'
  }

  draw() {
    let { react, style, label } = this.layoutNode
    this.ctx.fillStyle = style.backgroundColor || this.backgroundColor
    this.ctx.beginPath()
    this.ctx.moveTo(0, 0)
    this.ctx.lineTo(50, 0)
    this.ctx.lineTo(100, 50)
    this.ctx.lineTo(50, 100)
    this.ctx.lineTo(0, 100)
    this.ctx.lineTo(0, 0)
    this.ctx.stroke()
    this.ctx.fill()
    this.ctx.closePath()
  }
}
